X-ray energy of an accelerator is an important source parameter for an inspection system and directly relates to radiography indexes and radiation protection performances of the inspection system. By measurement of X-ray energy of the accelerator, energy state of the accelerator can be acquired in real time, which can be used to direct adjustment of radiography indexes and radiation protection of the inspection system.